# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=libeatmydata
pkgver=130
pkgrel=0
pkgdesc="An LD_PRELOAD library that disables all forms of writing data safely to disk"
url="https://www.flamingspork.com/projects/libeatmydata/"
arch="all"
license="GPL-3.0-or-later"
makedepends="autoconf automake libtool"
checkdepends="bash strace"
source="https://github.com/stewartsmith/libeatmydata/releases/download/v$pkgver/libeatmydata-$pkgver.tar.gz"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check-debug
}

package() {
	make DESTDIR="$pkgdir" install
	rm "$pkgdir"/usr/lib/libeatmydata.a
}

sha512sums="
80edeee1b39e14d10e7d04d7fff63a233119c6e13216e92ec786cc41ecd79eb58937da0e621aaef697490e9fb285f3e1109b786ee6967fa1736bb4879e100f18  libeatmydata-130.tar.gz
"
